<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>商品查询</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/admin_index.css}">
</head>
<body>
    <table class="table_list">
        <tr class="title">
            <th>编号</th>
            <th>ISBN编号</th>
            <th>书名</th>
            <th>作者</th>
            <th>出版社</th>
            <th>出版时间</th>
            <th>原价</th>
            <th>新价</th>
            <th>作者地区</th>
            <th>是否是套装</th>
            <th>图书类型</th>
            <th>图书描述</th>
            <th>图片</th>
            <th colspan="2">操作</th>
        </tr>
        <th:block th:each="book : ${bookList}">
            <tr>
                <td th:text="${book.id}"></td>
                <td th:text="${book.isbn}"></td>
                <td th:text="${book.name}"></td>
                <td th:text="${book.author}"></td>
                <td th:text="${book.publisher}"></td>
                <td th:text="${#dates.format(book.publishDate, 'yyyy年MM月')}"></td>
                <td th:text="${book.oldPrice} + '元'"></td>
                <td th:text="${book.newPrice} + '元'"></td>
                <td th:text="${book.authorLoc}"></td>
                <td th:text="${book.suit.getDesc()}"></td>
                <td th:text="${book.category.getDesc()}"></td>
                <td th:text="${book.info}"></td>
                <td>
                    <img th:src="'/images/' + ${book.imgUrl}" width="50" height="80">
                </td>
                <td><a th:href="@{/admin/goods/toUpdate/{id}(id=${book.id})}">修改</a></td>
                <td><a href="#">删除</a></td>
            </tr>
        </th:block>
        <tr>
            <td colspan="14">
                <a th:href="@{/admin/goods/addShow}">添加图书</a>
            </td>
        </tr>
    </table>
</body>
</html>